package com.bjpowernode.common.util;

import java.util.Random;

/**
 * ClassName:CodeMessageRandom
 * Package:com.bjpowernode.common
 * Description: 产生随机验证码
 *
 * @date:2021/7/20 10:07
 * @author:动力节点
 */
public class CodeMessageRandom {

    //如果想指定长度，给方法添加参数即可
    public static String getRandomCodeMessage(){
        Random random = new Random();
        String codeMessage ="";
        for (int i = 0; i <6 ; i++) {
             codeMessage +=random.nextInt(10);
        }
        return codeMessage;
    }

}
